package com.us.proframe.service.knowledge;

import com.us.proframe.mapper.knowledge.SysUserMapper;
import com.us.proframe.model.knowledge.SysUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 处理用户的业务逻辑.
 * User: lyh
 * Date: 2017/8/9
 * Time: 16:16
 */
@Service
public class SysUserService {

    @Autowired
    private SysUserMapper sysUserMapper;


    public SysUser findByUserName(String userName){
        return sysUserMapper.selectByUserName(userName);
    }


    public int deleteByPrimaryKey(Integer id){
        return sysUserMapper.deleteByPrimaryKey(id);
    }

    public int insert(SysUser record){
        return sysUserMapper.insert(record);
    }

    public SysUser selectByPrimaryKey(Integer id){
        return sysUserMapper.selectByPrimaryKey(id);
    }

    public int updateByPrimaryKeySelective(SysUser record){
        return sysUserMapper.updateByPrimaryKeySelective(record);
    }

}
